package com.yckj.ytracker.api.model;

/**
 * 框架之间需要传递的数据
 *
 * @author tcl
 */
public class TrackerData {
    /**
     * ytracker内部的唯一id, 用来确定一条调用链
     */
    private String traceId;
    /**
     * 节点id. 按照0.x.x...的格式表明节点在节点树种的位置
     */
    private String spanId;
    /**
     * 根节点集群名
     */
    private String rootName;

    public TrackerData() {
    }

    public TrackerData(String traceId, String spanId) {
        this.traceId = traceId;
        this.spanId = spanId;
    }

    public String getTraceId() {
        return traceId;
    }

    public void setTraceId(String traceId) {
        this.traceId = traceId;
    }

    public String getSpanId() {
        return spanId;
    }

    public void setSpanId(String spanId) {
        this.spanId = spanId;
    }

    public String getRootName() {
        return rootName;
    }

    public void setRootName(String rootName) {
        this.rootName = rootName;
    }

    @Override
    public String toString() {
        return "TrackerData{" +
                "traceId='" + traceId + '\'' +
                ", spanId='" + spanId + '\'' +
                ", rootName='" + rootName + '\'' +
                '}';
    }
}
